-- -*- mode: lua; -*-

local bd = require("blockdiagram")
local u = require("utils")

local TYPE_NAME = 'struct ptrig_period'
local DATA_LEN = 200
local VALUE = u.fill({ sec=99, usec = 333 }, DATA_LEN)
local BUF_LEN = 8

return bd.system
{
   imports = { "stdtypes", "cconst", 'mqueue', 'ptrig' },

   blocks = {
      { name="cconst1", type="ubx/cconst" },
      { name="ptrig1", type="ubx/ptrig" },
   },

   configurations = {
      {
	 name="cconst1",
	 config = { type_name=TYPE_NAME, data_len=DATA_LEN, value=VALUE, }
      },
      {
	 name="ptrig1",
	 config = { period = { sec=0, usec=10000}, chain0 = { b = "#cconst1" } }
      },
   },
   connections = {
      { src = "cconst1.out", type = "ubx/mqueue" },
   }
}
